import React, { Component } from 'react';
import Listitem from './listitem';
import Listall from './Listall';
import axios from 'axios';
export default class goodslist extends Component{
    constructor(match){
        super();
        this.state ={
            list : [],
            multiproductList:[]
        }
    }
    componentDidMount(){
        axios.get('http://cloud.jss.com.cn/order/product/findProduct.do?accountToken=852898F979F346A7B74A1B7B5EA22B97&_=1530599926525').then((res)=>{
            if(res.data.result){
                this.setState({
                    list:res.data.list,
                    multiproductList:res.data.multiproductList
                })
            }
        })
    }
    render(match){
        return (
            <div className="m-prolistper">
            <div>商品列表</div>
            <Listall component={Listitem} list={this.state.list} className="Listall f-clearfix e-ml20" type="list"/>
            <Listall component={Listitem} list={this.state.multiproductList} className="Listall f-clearfix e-ml20" type="multiproductList"/>
            </div>
        )
    }
}
